import { renderRoutes } from 'react-router-config'
import { NavLink } from 'react-router-dom'
import React, { memo, useEffect } from 'react'
import request from '../../request/request';
import { dicoverMenu } from '@/common/local-data';
import { DiscoverWraper } from './style';

export default memo(function Discover(props) {
    const { route } = props;
    return (
        <DiscoverWraper>
            <div className="header">
                <div className="wrap-v1 header-content">
                    <div className="item-wraper">
                        {
                            dicoverMenu.map((item, index) => {
                                return (
                                    <div className="item" key={item.title}>
                                        <NavLink to={item.link} activeClassName="active">
                                            <div className="">{item.title}</div>
                                        </NavLink>
                                    </div>
                                )
                            })
                        }
                    </div>
                </div>

            </div>
            {renderRoutes(route.routes)}
        </DiscoverWraper>
    )
})

